package dev;

import java.lang.reflect.Field;

import javax.servlet.UnavailableException;

import org.eclipse.jetty.server.ResourceCache;

public class DefaultServlet extends org.eclipse.jetty.servlet.DefaultServlet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public void init() throws UnavailableException {
		super.init();
		try {
			Field field = org.eclipse.jetty.servlet.DefaultServlet.class.getDeclaredField("_cache");
			field.setAccessible(true);
			ResourceCache rc =(ResourceCache) field.get(this);
			rc.setUseFileMappedBuffer(false);
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
	}
	
	
	
}
